home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
UUPC11QS.ARJ
/
UUCICO.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-11-21
|
3KB
|
111 lines
/*
* History:4,1
* Mon May 15 19:56:44 1989 Add c_break handler ahd
* 20 Sep 1989 Add check for SYSDEBUG in MS-DOS environment ahd
* 22 Sep 1989 Delete kermit and password environment
* variables (now in password file). ahd
* 30 Apr 1990 Add autoedit support for sending mail ahd
* 2 May 1990 Allow set of booleans options via options= ahd
* 29 Jul 1990 Change mapping of UNIX to MS-DOS file names ahd
*/
/*
ibmpc/host.c
IBM-PC host program
*/
#include <dos.h>
#include <setjmp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "lib.h"
#include "dcp.h"
#include "hlib.h"
#include "hostable.h"
#include "security.h"
#include "modem.h"
#include "pushpop.h"
#include "timestmp.h"
#include "ulib.h"
currentfile();
int c_break( void );
jmp_buf dcpexit;
void main( int argc, char *argv[])
{
int status;
/*--------------------------------------------------------------------*/
/* Report our version number and date/time compiled */
/*--------------------------------------------------------------------*/
banner( argv );
#if defined(__CORE__)
copywrong = strdup(copyright);
checkref(copywrong);
#endif
if (!configure( B_UUIO ))
panic();
/*--------------------------------------------------------------------*/
/* Trap control C exits */
/*--------------------------------------------------------------------*/
#ifdef __TURBOC__
ctrlbrk(c_break);
#endif
printmsg(3,"main: Control C handler set");
if (getenv("TZ") == NULL )
{
printmsg(0,"Environment variable TZ must be set!");
panic();
}
tzset(); /* Set up time zone information */
PushDir(spooldir);
atexit( PopDir );
/*--------------------------------------------------------------------*/
/* setup longjmp for error exit's */
/*--------------------------------------------------------------------*/
status = 10; /* set default in case we get out via a longjmp */
if (setjmp(dcpexit) == 0)
status = dcpmain(argc, argv);
exit( status );
} /*main*/
#ifdef __TURBOC__
/*--------------------------------------------------------------------*/
/* c_break -- control break handler to allow graceful shutdown */
/* of interrupt handlers, etc. */
/*--------------------------------------------------------------------*/
int c_break( void )
{
printmsg(0,"c_break: program aborted by user Ctrl-Break");
if (port_active == TRUE)
shutdown();
fcloseall();
exit(100); /* Allow program to abort */
return(0); /* Abort (never reached) */
} /* c_break */
#endif